<form>
   <div id="edit_error_div"  style="display:none; color: #b00000"></div>
    <select class="chzn-select" id="edit_heading">
	<option value="0"> Select Heading</option>
	<?php foreach($menu_headings as $h){?>
		<option value="<?php echo $h->id?>"
		<?php if($menu_details->heading_id== $h->id)
	{
		echo 'selected = "selected"';
		} ?>
		>
		<?php echo $h->name?></option>
		<?php }?>
	$menu_headings
	</select>
   <select class="chzn-select" id="edit_parent">
		<option value="">Select Parent</option>	
		<?php foreach($parent_menu as $parent){?>
		<option value="<?php echo $parent->id?>"
		 <?php if($menu_details->parent == $parent->id)
	{
		echo 'selected = "selected"';
		} ?> >
		
		<?php echo $parent->name?>
		</option>
		<?php }?>
	</select>
    <input type="text" placeholder="Menu Name" id="edit_name" value="<?= $menu_details->name;?>">
    <input type="text" placeholder="controller/function" id="edit_url" value="<?= $menu_details->url;?>" >	
    <input type="text" placeholder="glyphicons  ex.icon-user" id="edit_icon" value="<?= $menu_details->icon;?>" >
	<input type="text"  id="edit_id" value="<?= $menu_details->id;?>" >
	<label>
    <button type="button" class="btn btn-success" onclick="update_menu()">Update Menu</button>
	</label>
</form>
